From dc836abbb43d0acfbeeca99cca94fb8d4410b6f9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 14 Nov 2015 12:55:34 -0500 Subject: [PATCH] Adwaita: Fix window shadow size Ensure that the shadow extents don't change as we go to backdrop, to prevent windows from jumping. --- gtk/theme/Adwaita/_common.scss | 4 ++++ gtk/theme/Adwaita/gtk-contained-dark.css | 5 ++++- gtk/theme/Adwaita/gtk-contained.css | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index e4f27c34df..519ca12a28 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3262,7 +3262,11 @@ decoration { margin: 10px; &:backdrop { + /* the transparent shadow here is to enforce that the shadow extents don't + * change when we go to backdrop, to prevent jumping windows + */ box-shadow: 0 2px 6px 2px transparentize(black, 0.8), + 0 3px 9px 1px transparent, 0 0 0 1px $_wm_border_backdrop; } .tiled & { diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 05f5b4ed89..b37f335456 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -4409,7 +4409,10 @@ decoration { /* this is used for the resize cursor area */ margin: 10px; } decoration:backdrop { - box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.9); } + /* the transparent shadow here is to enforce that the shadow extents don't + * change when we go to backdrop, to prevent jumping windows + */ + box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(28, 31, 31, 0.9); } .tiled decoration { border-radius: 0; } .popup decoration { diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index e640761b82..623508b567 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -4581,7 +4581,10 @@ decoration { /* this is used for the resize cursor area */ margin: 10px; } decoration:backdrop { - box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18); } + /* the transparent shadow here is to enforce that the shadow extents don't + * change when we go to backdrop, to prevent jumping windows + */ + box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(0, 0, 0, 0.18); } .tiled decoration { border-radius: 0; } .popup decoration { -- 2.30.2